﻿@using System.Collections
@using Telerik.Web.Mvc.UI
@using Helena.Areas.Productos.Models
@using Helena.Areas.Configuraciones.Models
@using Helena.Areas.Productos.Models
@using Helena.Areas.Salidas.Models

@model SalidaView
           
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@{
    ViewBag.Title = "Añadir una Salida";
}

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Registre la Salida</legend>
        <table style="width:100%">
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.NumeroGuia)
                    </div>
                    <div>
                        @Html.EditorFor(model => model.NumeroGuia)
                        @Html.ValidationMessageFor(model => model.NumeroGuia)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.ProveedorID)
                    </div>
                    <div class="editor-field">@(Html.Telerik().DropDownList().Name("ProveedorID")
                                            .SelectedIndex(1)
                                            .BindTo(new SelectList((ICollection<Helena.Areas.Proveedores.Models.ProveedorView>)ViewData["Proveedores"], "ID", "RazonSocial"))
                                            )
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Fecha)
                    </div>
                    <div>
                        @Html.EditorFor(model => model.Fecha)
                        @Html.ValidationMessageFor(model => model.Fecha)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Descripcion)
                    </div>
                    <div>
                        @Html.TextAreaFor(model => model.Descripcion)
                        @Html.ValidationMessageFor(model => model.Descripcion)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Estado)
                    </div>
                    <div>
                        @Html.EditorFor(model => model.Estado)
                        @Html.ValidationMessageFor(model => model.Estado)
                    </div>
                </td>
            </tr>
        </table>
    </fieldset>    
}
